<?php if (!defined('THINK_PATH')) exit(); /*a:2:{s:100:"D:\development\2C8BF558-3886-40A2-B2B6-E724420FD872\public/../application/index\view\index\user.html";i:1504833530;s:103:"D:\development\2C8BF558-3886-40A2-B2B6-E724420FD872\public/../application/index\view\common\header.html";i:1504833409;}*/ ?>
<!DOCTYPE html>
<html>
<head>
	<link rel="stylesheet" type="text/css" href="<?php echo STATIC_PATH; ?>/css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="<?php echo STATIC_PATH; ?>/css/index.css">
<link rel="stylesheet" type="text/css" href="<?php echo STATIC_PATH; ?>/css/font.css">
<!-- <script type="text/javascript" src = "<?php echo STATIC_PATH; ?>/js/jquery.cookie.js"></script> -->
<script type="text/javascript" src = "<?php echo STATIC_PATH; ?>/js/jquery-3.2.1.min.js"></script>
<script type="text/javascript" src = "<?php echo STATIC_PATH; ?>/js/bootstrap.min.js"></script>
<script type="text/javascript" src = "<?php echo STATIC_PATH; ?>/js/index.js"></script>
	<title>管理界面</title>
</head>
<body class="run-bg" style="z-index: 0">
  <div class="run-header">
    <a href="<?php echo url('Index/cancel'); ?>">
      <button type="button" class="btn btn-primary" style="width:5%;float: right;">注销</button>
    </a>
    <div class="run-header-span">
      欢迎你管理员<?php echo $_COOKIE['user']; ?>
    </div>
  </div>
  <div class="run-main" style="z-index: 0">
  	<div class="run-main-left">
  	  <div class="run-main-left-menu">
  	    <span class="glyphicon glyphicon-th" style="font-size: 20px"></span>
  	  	<span class="run-main-left-menu-font">主菜单</span>
  	  </div>
  	  <a href="<?php echo url('Index/text'); ?>">
  	  <div class="run-main-left-div">
        <span class="glyphicon glyphicon-home"></span>
  	  	<span>首页</span>
  	  </div>
  	  </a>  	  
  	  <div class="run-main-left-div" style="background-color: yellow">
        <span class="glyphicon glyphicon-user"></span>
  	  	<span>用户管理</span>
  	  </div>
  	  <a href="<?php echo url('Index/adduser'); ?>">
  	  <div class="run-main-left-div">
  	    <span class="glyphicon glyphicon-check"></span>
  	  	<span>添加用户</span>
  	  </div>
  	  </a>
  	  <a href="<?php echo url('Index/selectGroup'); ?>">
  	  <div class="run-main-left-div">
  	    <span class="glyphicon glyphicon-hand-right"></span>
  	  	<span>分组管理</span>
  	  </div>
  	  </a>
      <a href="<?php echo url('Form/form'); ?>">
      <div class="run-main-left-div">
        <span class="glyphicon glyphicon-list-alt"></span>
        <span>通用表单</span>
      </div>
      </a>
  	</div> 
  	<div class="run-main-right">
  	  <span>当前位置：用户管理</span>
  	</div>
  	<br><br>
    <form action="<?php echo url('Index/select'); ?>" method="GET">
	    <div class="input-group">      
        <span class="input-group-addon">用户搜索</span>
        <input type="text" class="form-control" style="width: 20%;margin-right:10px;" id="user-message-input" name="nickname">
        <button type="submit" class="btn btn-primary">搜索</button>
      </div>
    </form>
    <br><br>
    <?php if(is_array($list) || $list instanceof \think\Collection || $list instanceof \think\Paginator): $i = 0; $__LIST__ = $list;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$user): $mod = ($i % 2 );++$i;?>
  	  <div class="user-messageuser">
  	  	<div class="user-message-show">
          <div class="user-message-show-img">
            <img src="<?php echo $user['headimgurl']; ?>" width="80px;">
          </div>
          昵称：<?php echo $user['nickname']; ?> <br>
          性别：<?php switch($name=$user['sex']): case "0": ?>不详<?php break; case "1": ?>男<?php break; case "2": ?>女<?php break; default: ?>default
                <?php endswitch; ?><br>
          备注：<?php echo $user['remark']; ?><br>
          所在分组：<?php switch($name=$user['groupid']): case "100": ?>SNC<?php break; case "101": ?>粉丝<?php break; case "102": ?>运营者<?php break; default: ?>default
                <?php endswitch; ?><br>
  	  	</div>
  
  	  	<div class="user-message-admin">
  	  		<button class="btn btn-primary btn-sm" data-toggle="modal" data-target="#remark_<?php echo $user['openid']; ?>">修改备注</button><br>
          <a href="<?php echo url('Index/usermessage'); ?>?openid=<?php echo $user['openid']; ?>"><button class="btn btn-primary btn-sm">
          详细信息</button></a>
  	  	</div>

        <div class="modal fade" id="remark_<?php echo $user['openid']; ?>">
          <div class="modal-dialog" style="z-index: 2000">
            <div class="modal-content">
              <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">
                  &times;
                </button>
                <h4 class="modal-title" id="myModalLabel">
                  修改备注
                </h4>
              </div>
              <form action="<?php echo url('Wechat/remark'); ?>?openid=<?php echo $user['openid']; ?>" method="POST">
                <div class="modal-body">
                  <div class="input-group input-group-lg">
                    <span class="input-group-addon">请输入备注</span>
                    <input type="text" class="form-control" placeholder="Please enter a note" name="remarkinput">
                  </div>
                </div>
                <div class="modal-footer">
                  <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
                  <button type="submit" class="btn btn-primary">
                    确认
                  </button>
                </div>
              </form>
            </div><!-- /.modal-content -->
          </div><!-- /.modal -->
        </div>

        <div class="modal fade" id="tag_<?php echo $user['openid']; ?>">
          <div class="modal-dialog" style="z-index: 2000">
            <div class="modal-content">
              <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">
                  &times;
                </button>
                <h4 class="modal-title" id="myModalLabel">
                  添加标签
                </h4>
              </div>
              <form action="<?php echo url('Index/tag'); ?>" method="POST">
                <div class="modal-body">
                  <div class="input-group input-group-lg">
                    <span class="input-group-addon">请输入标签</span>
                    <input type="text" class="form-control" placeholder="Please enter a ">
                  </div>
                </div>
                <div class="modal-footer">
                  <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
                  <button type="submit" class="btn btn-primary">
                    确认
                  </button>
                </div>
              </form>
            </div><!-- /.modal-content -->
          </div><!-- /.modal -->
        </div>
  	  </div><!-- /.user-messageuser-->
    <?php endforeach; endif; else: echo "" ;endif; ?>
    <div class="user-message-page">
      <?php echo $list->render(); ?>
    </div>
  </div>
</body>
</html>